﻿
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title>Mint UI</title>
    <link rel="stylesheet" href="/mint-ui/lib/style.css">
</head>
<body>
    <div id="app">

        <router-view :key="$route.path">
        </router-view>


        <mt-tabbar fixed v-show="bar_show">
            <mt-tab-item id="tab1">
                <mt-button type="primary" @click="url('/index/<%=room%>/<%=area%>')">状态 </mt-button>
            </mt-tab-item>
            <mt-tab-item id="tab2">
                <mt-button type="primary" @click="url('/operate/<%=room%>/<%=area%>')"> 操作</mt-button>
            </mt-tab-item>

            <mt-tab-item id="tab3">
                <mt-button type="primary" @click="url('/goods/<%=room%>/<%=area%>')"> 物料</mt-button>
            </mt-tab-item>


            <mt-tab-item id="tab4">
                <mt-button type="primary" @click="url('/check/<%=room%>/<%=area%>')"> 盘点</mt-button>
            </mt-tab-item>
            <mt-tab-item id="tab5">

                <mt-button type="primary" @click="url('/setup/<%=room%>/<%=area%>')">配置</mt-button>
            </mt-tab-item>
            <mt-tab-item id="tab6">

                <mt-button type="primary" @click="url('/about')"> 联系</mt-button>
            </mt-tab-item>
        </mt-tabbar>

    </div>


    <script src="/vue/dist/vue.js"></script>
    <script src="/vue-router/dist/vue-router.js"></script>
    <script src="/mint-ui/lib/index.js"></script>
    <script src="/axios/dist/axios.min.js"></script>
    <script src="/lib/script/components/check.js"></script>
    <script src="/lib/script/components/operate.js"></script>
    <script src="/lib/script/components/setup.js"></script>
    <script src="/lib/script/components/goods.js"></script>
    <script src="/lib/script/index.js"></script>
    <script>
        const app = new Vue({
        router,
        el: '#app',
        data() {
        return {
        bar_show: true,
        message: 'Hello1'
        }
        },
        created () {
        router.push("/loading/<%=room%>/<%=area%>").catch(err => err)
        },
        methods:
        {
        execute(action)
        {
        axios.get(action,
        {
        }).then(function(res){
        console.log(JSON.stringify(res.data));
        }).catch(function (error) {
        console.log(error);
        });
        },
        url(src){
        router.push(src).catch(err => err)
        }
        },
        })

    </script>
</body>
</html>
